﻿function inputCh(val){
	if(val.value == ""){
		val.nextSibling.style.display = "block";
	}
	else{ val.nextSibling.style.display = "none";
	}}

 

function mailChecker(e){
var reg = /@*/;
console.log(reg.exec(e.value));
if((e.value == "") || (e.value.length < 3)  || (reg.exec(e.value))){
		e.nextSibling.style.display = "block";
}
else
{
	e.nextSibling.style.display = "none";
}	
}



 function chNum(nu){
	 var re = /^[0-9]*$/;

	if(nu.value != "5" || nu.value.length > 6 || re.test(nu.value)){
	nu.nextSibling.style.display = "none";
	
	}
	else{
		nu.nextSibling.style.display = "block";
		console.log("Номер неверный");
	}

 }

function agree(ar){
	if(ar.checked == true)
	{
		console.log("Принято");
	}
	else{
		console.log("Не принято");
	}
} 


var fiBlock = document.getElementById('fblock');
var seBlock = document.getElementById('sblock');
	
function revtr(ke){
		if(ke.checked==true){
					fiBlock.style.display = 'block';
		}else{
		fiBlock.style.display = 'none';
		}
	}

function revtd(de){
		if(de.checked==true){
					seBlock.style.display = 'block';
		}else{
		seBlock.style.display = 'none';
		}
	}

var formEnd = document.getElementsByTagName('textarea');

}


 